import request from '@/utils/request';

/**
 * 添加套餐卡列表
 */
export async function addPayAmount(data) {
  const res = await request.post('/pay/addPayAmount', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 套餐卡列表
export async function payAmountList(data) {
  const res = await request.post('/pay/payAmount', data);
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
// 修改套餐卡
export async function editPayAmount(data) {
  const res = await request.post('/pay/editPayAmount', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
export async function delPayAmount(data) {
  const res = await request.post('/pay/delPayAmount', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
